a = input("请输入带有符号的温度值：")
if a[-1] in ['f', 'F']:
    c = (eval(a[0:-1]) -  32) / 1.8
    print("转换后的温度是{:.2f}c".format(c))
elif a[-1] in ['C', 'c']:
    F = 1.8 * eval(a[0:-1]) + 32
    print("转换后的温度是{:.2f}F".format(F))
else:
    print("输入错误")

